﻿using SuperSocket.SocketBase;
using SuperSocket.SocketBase.Protocol;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SuperSocketServer.SSBase
{
    public class MyServer : AppServer<MySession, MyRequestInfo>
    {

        public MyServer() : base(new DefaultReceiveFilterFactory<MyReceiveFilter, MyRequestInfo>())
        {
            this.NewSessionConnected += MyServer_NewSessionConnected;
            this.SessionClosed += MyServer_SessionClosed;
        }

        

        private void MyServer_SessionClosed(MySession session, CloseReason value)
        {
           
        }

        private void MyServer_NewSessionConnected(MySession session)
        {
            
        }


        protected override void OnStarted()
        {
            //启动成功
            LogHelper.WriteLog(string.Format("Socket启动成功：{0}:{1}", this.Config.Ip, this.Config.Port));
        }

    }
}
